package cn.bluethink.eguan.module.mapper;

import java.util.List;

import cn.bluethink.eguan.module.entity.EgModuleobjectEntity;
import tk.mybatis.mapper.common.Mapper;
import org.apache.ibatis.annotations.Param;

public interface EgModuleObjectMapper extends Mapper<EgModuleobjectEntity> {
	/**
	 * 开通服务
	 * 
	 * @param entity
	 * @return
	 * @throws Exception
	 */
	public int open(EgModuleobjectEntity entity) throws Exception;

	/**
	 * 查询服务是否开通
	 * 
	 * @param mid
	 * @return
	 * @throws Exception
	 */
	public List<EgModuleobjectEntity> queryByMid(@Param("mid") Long mid, @Param("fid") Long fid) throws Exception;

	/**
	 * 关闭服务
	 * 
	 * @param mid
	 * @return
	 * @throws Exception
	 */
	public int close(@Param("mid")Long mid,@Param("fid")Long fid) throws Exception;
	
	
	/**
	 * 更新已开通的服务
	 * 
	 * @return
	 * @throws Exception
	 */
	public int updateOpenServe(EgModuleobjectEntity entity) throws Exception;

}
